package com.dream.main;


import com.dream.game.R;
import com.dream.view.HelpView;
import com.dream.view.LoadView;
import com.dream.view.MainView;
import com.dream.view.MenuView;
import com.dream.view.MiddleViewbk;


import android.app.Activity;
import android.graphics.Paint;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.Window;
import android.view.WindowManager;

public class DreamGameActivity extends Activity {
	private MenuView menuView;
	private HelpView helpview;
	private MiddleViewbk middleView;
	private LoadView loadView;
	private MainView mainView;
	public static Paint paint;
	public Handler handler = new Handler() {
		public void handleMessage(Message msg) {
			switch (msg.what) {
			case 1:
				toLoadView();
				break;
			case 2:
				toMainView();
				break;
			case 3:
				toHelpView();
				break;
			case 4:
				toMenuView();
			}
		};
	};

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
		this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);
		menuView = new MenuView(this);
		paint = new Paint();
		setContentView(menuView);
//		setContentView(new MainView(this));
	}

	void toGameView() {
		this.setContentView(R.layout.main);
	}

	void toHelpView() {
		helpview = new HelpView(this);
		this.setContentView(helpview);
	}

	void toMenuView() {
		this.setContentView(menuView);
	}

	void toMiddleView() {
		middleView = new MiddleViewbk(this);
		this.setContentView(middleView);
	}

	void toLoadView() {
		loadView = new LoadView(this);
		this.setContentView(loadView);
	}

	void toMainView(){
		mainView = new MainView(this);
		this.setContentView(mainView);
	}
}
